//---------------------------------------------------------------------------
#ifndef CImMosaiH
#define CImMosaiH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include "CtrlStd.h"
//---------------------------------------------------------------------------
class PACKAGE_CTRLSTD CImageMosaic : public TGraphicControl
    {
    private:
        TPicture                *FImag;
        bool                    FCenter;

    __published:
        __property              Align       = {                                         default = alClient  };
        __property bool         Center      = { read=FCenter,       write=SetCenter,    default = false     };
        __property              Enabled;
        __property TPicture     *Picture    = { read=GetPicture,    write=SetPicture,   default = NULL      };
        __property              Tag;
        __property              Visible;

    protected:
        virtual void __fastcall Paint(void);
        virtual void __fastcall WndProc( TMessage &Message );

    private:
        void        __fastcall SetCenter( bool bCenter );
        void        __fastcall SetPicture(      TPicture    *PPicture       );
        TPicture *  __fastcall GetPicture() const;

        void __fastcall DrawMosaic();
        virtual __fastcall ~CImageMosaic ();

    public:
        __fastcall CImageMosaic(TComponent* Owner);
    };
//---------------------------------------------------------------------------
#endif
 
